<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core">
<p:outputPanel id="panel_transit" layout="block" rendered="#{not empty transitBean.lazyModel}">

	<p:dataTable id="transitTable" var="transit" value="#{transitBean.lazyModel}" rows="20" paginator="true" lazy="true" style="margin-bottom:0"
	paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,50"
	selectionMode="single" selection="#{transitForm.selectedTransit}">

		<p:column selectionMode="multiple" style = "width:16px;text-align:center" />

	    <p:column headerText="id" sortBy="id" style="width:30px;text-align:center">
	        <h:outputText value="#{transit.id}" />
	    </p:column>

	    <p:column headerText="在途日期" sortBy="transit_date" style="width:80px;">
	        <h:outputText value="#{transit.transitDate}" />
	    </p:column>

	    <p:column headerText="总数量" sortBy="goods_total_count" style="width:50px;">
	        <h:outputText value="#{transit.goodsTotalCount}" />
	    </p:column>

	    <p:column headerText="总金额" sortBy="goods_total_price" style="width:50px;">
	        <h:outputText value="#{transit.goodsTotalPrice}" />
	    </p:column>

	    <p:column headerText="总运费" sortBy="freight_total" style="width:50px;">
	        <h:outputText value="#{transit.freightTotal}" />
	    </p:column>

	    <p:column headerText="是否到货" sortBy="arrive_flg" style="width:30px;">
	        <h:outputText value="#{transit.arriveFlg}" />
	    </p:column>

	    <p:column headerText="到货日期" sortBy="arrive_date" style="width:80px;">
	        <h:outputText value="#{transit.arriveDate}" />
	    </p:column>

	    <p:column headerText="rgtOpt" sortBy="rgt_opt" style="width:50px;">
	        <h:outputText value="#{transit.rgtOpt}" />
	    </p:column>

	    <p:column headerText="updOpt " sortBy="upd_opt" style="width:50px;">
	        <h:outputText value="#{transit.updOpt}" />
	    </p:column>

	    <p:column headerText="rgtDate" sortBy="rgt_date" style="width:80px;">
	        <h:outputText value="#{transit.rgtDate}" />
	    </p:column>

	    <p:column headerText="updDate " sortBy="upd_date" style="width:80px;">
	        <h:outputText value="#{transit.updDate}" />
	    </p:column>

	    <p:column style="width:32px;text-align: center">
	        <p:commandButton title="更新" icon="ui-icon-search" id="btn_transit_update" actionListener="#{transitBean.viewUpdateTransit(transit)}" ajax="true">
				<p:ajax event="dialogReturn" listener="#{transitBean.updateTransitResult}" update="transitTable" />
			</p:commandButton>
	    </p:column>

	</p:dataTable>
</p:outputPanel>
</ui:composition>